cmake_minimum_required(VERSION 3.10)

project(ReviewUI)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS "-g -Wall -Xlinker -export-dynamic")

aux_source_directory(src SRC_CODE)
find_package(PkgConfig REQUIRED)
find_package(fmt REQUIRED)
find_package(yaml-cpp REQUIRED)
find_package(soil2 REQUIRED)
find_package(sdbus-c++ REQUIRED)
pkg_check_modules(GTKMM REQUIRED IMPORTED_TARGET gtkmm-4.0)
pkg_check_modules(gstreamer REQUIRED IMPORTED_TARGET gstreamer-1.0 gstreamer-video-1.0 gstreamer-app-1.0)
pkg_check_modules(GLEW REQUIRED IMPORTED_TARGET glew)

link_libraries(
  PkgConfig::GTKMM
  PkgConfig::gstreamer
  PkgConfig::GLEW
  fmt
  rt
  yaml-cpp
  pthread
  soil2::soil2
  SDBusCpp::sdbus-c++
)

include_directories(
  ../include
)

add_executable(ReviewUI_test 
  src/UILoader.cpp
  run/UI_test.cpp
)

add_executable(ReviewUI
  ${SRC_CODE}
  run/ReviewUI.cpp
)

add_executable(mkvPlayer_test
  src/mkvPlayer.cpp
  run/mkvPlayer_test.cpp
)

add_executable(MPEGPlayer_test
  src/mpegPlayer.cpp
  run/mpegPlayer_test.cpp
)

add_executable(CameraMapReader_test
  src/CameraMapReader.cpp
  run/CameraMapReader_test.cpp
)

add_executable(FileScan_test
  src/FileScan.cpp
  run/FileScan_test.cpp
)
